package com.ouli.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Controller:创建处理器对象，对象放在springmvc容器中
 * */
@Controller
public class MyController {

    @RequestMapping(value = "/some.do")
    public ModelAndView dosome(){
        ModelAndView mv = new ModelAndView();
        mv.addObject("msg","欢迎使用springmvc");
        mv.addObject("fun","这是fun的数据");
        mv.setViewName("show");
        return mv;
    }
}
